package com.CST.vo.zx;

import com.CST.entity.cb.BdSysUser;
import com.CST.entity.zx.ZxViewPerson;
import com.CST.util.CloseConverter;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@ExcelIgnoreUnannotated
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("项目详细信息")
public class ProjectVo {

    @ApiModelProperty(value = "财务编码")
    @ExcelProperty("财务编码")
    private String financialCode;

    @ApiModelProperty(value = "项目编码")
    @ExcelProperty("项目编码")
    private String projectCode;

    @ApiModelProperty(value = "项目类别编号")
    @ExcelProperty("项目类别编号")
    private String entryId;

    @ApiModelProperty(value = "项目类别")
    @ExcelProperty("项目类型")
    private String entryName;

    @ApiModelProperty(value = "项目简称")
    @ExcelProperty("项目简称")
    private String financialName;


    @ApiModelProperty(value = "项目全称")
    @ExcelProperty("项目全称")
    private String projectInfo;

    @ApiModelProperty(value = "创建时间")
    @ExcelProperty("创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat("yyyy-MM-dd")
    private Date etlTime;

    @ApiModelProperty(value = "收入")
    @ExcelProperty("收入")
    private BigDecimal income;

    @ApiModelProperty(value = "负责人编号")
    @ExcelProperty("负责人编号")
    private String userId;

    @ApiModelProperty(value = "负责人")
    @ExcelProperty("项目负责人")
    private String userName;

    @ApiModelProperty(value = "科室编码")
    @ExcelProperty("科室编码")
    private String deptCode;

    @ApiModelProperty(value = "科室名")
    @ExcelProperty("所属科室")
    private String deptName;

    @ApiModelProperty(value = "是否封存")
    @ExcelProperty(value = "是否封存",converter = CloseConverter.class)
    private Integer isClose ;


    @ApiModelProperty(value = "总金额")
    private BigDecimal total;

    @ApiModelProperty(value = "审核状态")
    private Integer status;

    @ApiModelProperty("分批拨款")
    private List<AllocationVo> allocations;

    @ApiModelProperty("可查看人")
    private List<ZxViewPerson> viewPersons;

    @ApiModelProperty("可查看人绑定人数据来源,只用于点击编辑时的显示")
    private List<BdSysUser> viewPersonsSource;
}
